
from QCommand import QCommand, CmdIDGen
# event
from EventDefine import event_QCMD_MEMBERLEAVE

class QCmdMemberLeave(QCommand):
    CMDID = CmdIDGen()
    CMDNAME = "QCmdMemberLeave"

    def Send(self, memID):
        QCommand.InputSend(self, memberID = QCommand.MyMemberID, param = memID)

    def SendDirectly(self, memID):
        QCommand.SendDirectly(self, memberID = QCommand.MyMemberID, param = memID)

    def Handle(self, memberID, param):
        memID = param
        # raise event
        messenger.send(event_QCMD_MEMBERLEAVE, [memID])
